from app import app, db
from models.user import User

def check_user():
    """检查测试用户"""
    with app.app_context():
        user = User.query.filter_by(username='admin').first()
        print(f'User exists: {user is not None}')
        if user:
            print(f'User info: {user.to_dict()}')
        else:
            print('User not found')

if __name__ == "__main__":
    check_user()